#ifndef MESSAGE
#define MESSAGE

#include <cstring>
#include <string>
#include <iostream>

using namespace std;

class Message
{
	friend class Iceberg;
	private:
		unsigned char *message;
		bool *binary;
		int binaryLenght;
		int lenght;
		void AsciiToBinary ( void );
		void HexToBinary ( void );
	public:
		Message ( void );
		Message ( int size, string message, bool hex = false);
		Message ( Message const &message );
		Message ( char *message );
		void PrintHex ( void );
		void PrintASCII ( void );
		friend ostream& operator << ( ostream& stream, Message& message );
		friend istream& operator >> ( istream& stream, Message& message );
};

#endif

